/**
 *
 * Matroids.
 *
 * <p>Matroid is a structure abstract from matrix. Because of this abstraction, it can be applied to other fields such as graph, network, etc.
 *
 * <p><strong>Greedy algorithms.</strong>
 *
 * <p>Given matroid $M=(E,I)$, each element $e ∈ E$ has weight $w(e) ≥ 0$. Goal: find an indepedent set that has maximal sum of weights of the elements.
 *
 * <p>Gready algorithm: choose the elements of matroid in the descending order of weight (large weight first), reject the element only if the selection would destroy the independence of the current selected elements.
 *
 * <p>When this algorithm applied to graph, it's Kruskal algorithm to find maximal spanning tree. The key in this greedy algorithm is to quickly test if an added element would destroy the independency. In case of Kruskal algorithm, UnionFind is used to quickly check if an edge can create a cycle in the existing selection.
 *
 *
 *
 *
 *
 *
 *
 * @author Trung Phan
 *
 * @see <p>Lawyer, Combinatorial Optimization: Networks and Matroids</p>
 *
 */
package net.tp.algo.matroid;
